Add column that keeps count of distinct values grouped by a variable in pandas